package kordegi.forumsystem.mapper;
/**
 * @author kordegi
 * @date 2022.05.01 17:01
 * @Description
 */

import kordegi.forumsystem.entity.Article;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ArticleMapper {
    Article selectArticle(Long id);

    int addArticle(Article article);

    int updateArticle(Article article);

    int deleteArticle(Long id);

    //pager
    @Select("select * from forum_articles")
    List<Article> getPageInfo();

    long count();

    int saveOrUpdate(Article article);
}
